<!doctype html>

<html>
<head>
  <link rel="shortcut icon" href="static/images/favicon.ico" type="image/x-icon">
  <title>a11y.js (Closure Library API Documentation - JavaScript)</title>
  <link rel="stylesheet" href="static/css/base.css">
  <link rel="stylesheet" href="static/css/doc.css">
  <link rel="stylesheet" href="static/css/sidetree.css">
  <link rel="stylesheet" href="static/css/prettify.css">

  <script>
     var _staticFilePath = "static/";
     var _typeTreeName = "goog";
     var _fileTreeName = "Source";
  </script>

  <script src="static/js/doc.js">
  </script>


  <meta charset="utf8">
</head>

<body onload="grokdoc.onLoad();">

<div id="header">
  <div class="g-section g-tpl-50-50 g-split">
    <div class="g-unit g-first">
      <a id="logo" href="index.html">Closure Library API Documentation</a>
    </div>

    <div class="g-unit">
      <div class="g-c">
        <strong>Go to class or file:</strong>
        <input type="text" id="ac">
      </div>
    </div>
  </div>
</div>

<div class="clear"></div>

<h2><a href="closure_goog_dom_a11y.js.html">a11y.js</a></h2>

<pre class="prettyprint lang-js">
<a name="line1"></a>// Copyright 2007 The Closure Library Authors. All Rights Reserved.
<a name="line2"></a>//
<a name="line3"></a>// Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
<a name="line4"></a>// you may not use this file except in compliance with the License.
<a name="line5"></a>// You may obtain a copy of the License at
<a name="line6"></a>//
<a name="line7"></a>//      http://www.apache.org/licenses/LICENSE-2.0
<a name="line8"></a>//
<a name="line9"></a>// Unless required by applicable law or agreed to in writing, software
<a name="line10"></a>// distributed under the License is distributed on an &quot;AS-IS&quot; BASIS,
<a name="line11"></a>// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
<a name="line12"></a>// See the License for the specific language governing permissions and
<a name="line13"></a>// limitations under the License.
<a name="line14"></a>
<a name="line15"></a>/**
<a name="line16"></a> * @fileoverview Utilities for adding, removing and setting ARIA roles
<a name="line17"></a> * as defined by W3C ARIA Working Draft:
<a name="line18"></a> *     http://www.w3.org/TR/2010/WD-wai-aria-20100916/
<a name="line19"></a> * All modern browsers have some form of ARIA support, so no browser checks are
<a name="line20"></a> * performed when adding ARIA to components.
<a name="line21"></a> *
<a name="line22"></a> *
<a name="line23"></a> * @deprecated Use {@link goog.a11y.aria} instead.
<a name="line24"></a> *     This file will be removed on 1 Apr 2013.
<a name="line25"></a> *
<a name="line26"></a> */
<a name="line27"></a>goog.provide(&#39;goog.dom.a11y&#39;);
<a name="line28"></a>goog.provide(&#39;goog.dom.a11y.Announcer&#39;);
<a name="line29"></a>goog.provide(&#39;goog.dom.a11y.LivePriority&#39;);
<a name="line30"></a>goog.provide(&#39;goog.dom.a11y.Role&#39;);
<a name="line31"></a>goog.provide(&#39;goog.dom.a11y.State&#39;);
<a name="line32"></a>
<a name="line33"></a>goog.require(&#39;goog.a11y.aria&#39;);
<a name="line34"></a>goog.require(&#39;goog.a11y.aria.Announcer&#39;);
<a name="line35"></a>goog.require(&#39;goog.a11y.aria.LivePriority&#39;);
<a name="line36"></a>goog.require(&#39;goog.a11y.aria.Role&#39;);
<a name="line37"></a>goog.require(&#39;goog.a11y.aria.State&#39;);
<a name="line38"></a>
<a name="line39"></a>
<a name="line40"></a>/**
<a name="line41"></a> * Enumeration of ARIA states and properties.
<a name="line42"></a> * @enum {string}
<a name="line43"></a> * @deprecated Use {@link goog.a11y.aria.State} instead.
<a name="line44"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line45"></a> */
<a name="line46"></a>goog.dom.a11y.State = goog.a11y.aria.State;
<a name="line47"></a>
<a name="line48"></a>
<a name="line49"></a>/**
<a name="line50"></a> * Enumeration of ARIA roles.
<a name="line51"></a> * @enum {string}
<a name="line52"></a> * @deprecated Use {@link goog.a11y.aria.Role} instead.
<a name="line53"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line54"></a> */
<a name="line55"></a>goog.dom.a11y.Role = goog.a11y.aria.Role;
<a name="line56"></a>
<a name="line57"></a>
<a name="line58"></a>/**
<a name="line59"></a> * Enumeration of ARIA state values for live regions.
<a name="line60"></a> *
<a name="line61"></a> * See http://www.w3.org/TR/wai-aria/states_and_properties#aria-live
<a name="line62"></a> * for more information.
<a name="line63"></a> * @enum {string}
<a name="line64"></a> * @deprecated Use {@link goog.a11y.aria.LivePriority} instead.
<a name="line65"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line66"></a> */
<a name="line67"></a>goog.dom.a11y.LivePriority = goog.a11y.aria.LivePriority;
<a name="line68"></a>
<a name="line69"></a>
<a name="line70"></a>/**
<a name="line71"></a> * Sets the role of an element.
<a name="line72"></a> * @param {Element} element DOM node to set role of.
<a name="line73"></a> * @param {goog.dom.a11y.Role|string} roleName role name(s).
<a name="line74"></a> * @deprecated Use {@link goog.a11y.aria.setRole} instead.
<a name="line75"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line76"></a> */
<a name="line77"></a>goog.dom.a11y.setRole = function(element, roleName) {
<a name="line78"></a>  goog.a11y.aria.setRole(
<a name="line79"></a>      /** @type {!Element} */ (element),
<a name="line80"></a>      /** @type {!goog.dom.a11y.Role} */ (roleName));
<a name="line81"></a>};
<a name="line82"></a>
<a name="line83"></a>
<a name="line84"></a>/**
<a name="line85"></a> * Gets role of an element.
<a name="line86"></a> * @param {Element} element DOM node to get role of.
<a name="line87"></a> * @return {?(goog.dom.a11y.Role|string)} rolename.
<a name="line88"></a> * @deprecated Use {@link goog.a11y.aria.getRole} instead.
<a name="line89"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line90"></a> */
<a name="line91"></a>goog.dom.a11y.getRole = function(element) {
<a name="line92"></a>  return /** @type {?(goog.dom.a11y.Role|string)} */ (
<a name="line93"></a>      goog.a11y.aria.getRole(/** @type {!Element} */ (element)));
<a name="line94"></a>};
<a name="line95"></a>
<a name="line96"></a>
<a name="line97"></a>/**
<a name="line98"></a> * Sets the state or property of an element.
<a name="line99"></a> * @param {Element} element DOM node where we set state.
<a name="line100"></a> * @param {goog.dom.a11y.State|string} state State attribute being set.
<a name="line101"></a> *     Automatically adds prefix &#39;aria-&#39; to the state name.
<a name="line102"></a> * @param {boolean|number|string} value Value for the
<a name="line103"></a> *     state attribute.
<a name="line104"></a> * @deprecated Use {@link goog.a11y.aria.setState} instead.
<a name="line105"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line106"></a> */
<a name="line107"></a>goog.dom.a11y.setState = function(element, state, value) {
<a name="line108"></a>  goog.a11y.aria.setState(
<a name="line109"></a>      /** @type {!Element} */ (element),
<a name="line110"></a>      /** @type {!goog.dom.a11y.State} */ (state),
<a name="line111"></a>      /** @type {boolean|number|string} */ (value));
<a name="line112"></a>};
<a name="line113"></a>
<a name="line114"></a>
<a name="line115"></a>/**
<a name="line116"></a> * Gets value of specified state or property.
<a name="line117"></a> * @param {Element} element DOM node to get state from.
<a name="line118"></a> * @param {goog.dom.a11y.State|string} stateName State name.
<a name="line119"></a> * @return {string} Value of the state attribute.
<a name="line120"></a> * @deprecated Use {@link goog.a11y.aria.getState} instead.
<a name="line121"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line122"></a> */
<a name="line123"></a>goog.dom.a11y.getState = function(element, stateName) {
<a name="line124"></a>  return goog.a11y.aria.getState(
<a name="line125"></a>      /** @type {!Element} */ (element),
<a name="line126"></a>      /** @type {!goog.dom.a11y.State} */ (stateName));
<a name="line127"></a>};
<a name="line128"></a>
<a name="line129"></a>
<a name="line130"></a>/**
<a name="line131"></a> * Gets the activedescendant of the given element.
<a name="line132"></a> * @param {Element} element DOM node to get activedescendant from.
<a name="line133"></a> * @return {Element} DOM node of the activedescendant.
<a name="line134"></a> * @deprecated Use {@link goog.a11y.aria.getActiveDescendant} instead.
<a name="line135"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line136"></a> */
<a name="line137"></a>goog.dom.a11y.getActiveDescendant = function(element) {
<a name="line138"></a>  return goog.a11y.aria.getActiveDescendant(
<a name="line139"></a>      /** @type {!Element} */ (element));
<a name="line140"></a>};
<a name="line141"></a>
<a name="line142"></a>
<a name="line143"></a>/**
<a name="line144"></a> * Sets the activedescendant value for an element.
<a name="line145"></a> * @param {Element} element DOM node to set activedescendant to.
<a name="line146"></a> * @param {Element} activeElement DOM node being set as activedescendant.
<a name="line147"></a> * @deprecated Use {@link goog.a11y.aria.setActiveDescendant} instead.
<a name="line148"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line149"></a> */
<a name="line150"></a>goog.dom.a11y.setActiveDescendant = function(element, activeElement) {
<a name="line151"></a>  goog.a11y.aria.setActiveDescendant(
<a name="line152"></a>      /** @type {!Element} */ (element),
<a name="line153"></a>      activeElement);
<a name="line154"></a>};
<a name="line155"></a>
<a name="line156"></a>
<a name="line157"></a>
<a name="line158"></a>/**
<a name="line159"></a> * Class that allows messages to be spoken by assistive technologies that the
<a name="line160"></a> * user may have active.
<a name="line161"></a> *
<a name="line162"></a> * @param {goog.dom.DomHelper} domHelper DOM helper.
<a name="line163"></a> * @constructor
<a name="line164"></a> * @extends {goog.Disposable}
<a name="line165"></a> * @deprecated Use {@link goog.a11y.aria.Announcer} instead.
<a name="line166"></a> *     This alias will be removed on 1 Apr 2013.
<a name="line167"></a> */
<a name="line168"></a>goog.dom.a11y.Announcer = goog.a11y.aria.Announcer;
</pre>


</body>
</html>
